package com.coda.app.mapper;

import com.coda.entity.LeaseTerm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LeaseTermMapper {
    /**
     * 获取租期信息
     * @return
     */
    List<LeaseTerm> getLeaseTerm(@Param("apartmentId") Long apartmentId,@Param("roomId") Long roomId);

    /**
     *
     * @param leaseTermId
     */
    @Select("select * from lease_term where id = #{leaseTermId}")
    LeaseTerm getLeaseTermById(Long leaseTermId);

    /**
     * 根据房间id获取租期信息
     * @param id
     * @return
     */
    List<LeaseTerm> getLeaseTermByRoomId(Long id);
}
